<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
	</head>
	<body>
		<button id="wo">window.open()</button>
		<input type="text">
	</body>
    <script>
		var wo = document.getElementById("wo");
		wo.addEventListener('click',function(){
			window.open('http://www.baidu.com','_self');
			//window.location.href="http://www.baidu.com";
		});
    </script>
</html>